#include "qipadressproperty.h"

QIPAdressProperty::QIPAdressProperty(QAbstractProperty *parent):
    QIntProperty(parent)
{
    set_property("type","IPAdress");
}

QString QIPAdressProperty::get_value_text()
{
    QString ret;
    uint ip=get_value().toUInt();
    ret.sprintf("%d.%d.%d.%d",(ip>>24)&0xff,(ip>>16)&0xff,(ip>>8)&0xff,ip&0xff);
    return ret;
}

qRegisterProperty("IPAdress",QIPAdressProperty)
